package com.rssreader.client.portlets;

import com.extjs.gxt.ui.client.mvc.Dispatcher;
import com.extjs.gxt.ui.client.widget.custom.Portlet;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.rssreader.client.RSSReaderConstants;
import com.rssreader.client.components.NavPanel;
import com.rssreader.client.mvc.events.AppEvents;

public class NavPortlet extends Portlet {

    public NavPortlet() {
	setHeading("Navigation");
	setLayout(new FitLayout());
	setHeight(350);
	setId(RSSReaderConstants.NAV_PORTLET);

	NavPanel navPanel = new NavPanel();
	navPanel.setHeaderVisible(false);
	add(navPanel);
	// 告知portal，此portlet已經被創建
	Dispatcher.forwardEvent(AppEvents.NewPortletCreated, this);
    }
}
